package com.hp.tiger.chapter9;

import java.util.concurrent.TimeUnit;

/**
 * @author XavierDong
 **/
public class SuspensionClient {

    public static void main(String[] args) throws InterruptedException {

        final RequestQueue requestQueue = new RequestQueue();
        new ClientThread(requestQueue, "Alex").start();
        ServerThread serverThread = new ServerThread(requestQueue);
        serverThread.start();
//        serverThread.join();

        TimeUnit.SECONDS.sleep(10);
        serverThread.close();
    }
}
